home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11053 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  955 b 

  1. Path: news.umbc.edu!not-for-mail
  2. From: schlein@umbc.edu (Jonas J. Schlein)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Calling a function in variable
  5. Date: 21 Mar 1996 13:48:09 -0500
  6. Organization: University of Maryland Baltimore County
  7. Message-ID: <4is899$r2i@umbc9.umbc.edu>
  8. References: <4ikjlq$71@Server2.swix.ch>
  9. NNTP-Posting-Host: umbc9.umbc.edu
  10. NNTP-Posting-User: schlein
  11.  
  12. Aurelio Caliaro  <caliaro@swix.ch> wrote:
  13. |> It is strange but I can't remember how I need to call a 
  14. |> function whose address is in a variable. 
  15. |> If the function address is in "(void*)Addr", how do I 
  16. |> call it? 
  17.  
  18. You don't...Or more precisely you can't store a function address
  19. in a pointer to void. You can, however have a variable of function
  20. type (well actually pointer to function which works the same in ANSI C).
  21.  
  22. Please read the FAQ. Particularly section 4.13...
  23. -- 
  24. "If it wasn't for C, we would be using BASI, PASAL, and OBOL."
  25.  
  26. Jonas J. Schlein  (schlein@gl.umbc.edu)
  27.